package com.tql.mall.model.enums.merchant;

import lombok.Getter;

@Getter
public enum RegiFailEnum {
    FAIL_ACCOUNT_REPEATED(1,"该账号名已经被使用了！"),
    FAIL_PASSWD_DIFFERNET(2,"两次填写的密码不相同！"),
    FAIL_INFO_NOT_COMPLETED(3,"信息填写不全！");
    ;
    private Integer status;
    private String msg;
    RegiFailEnum(Integer status,String msg){
        this.status = status;
        this.msg = msg;
    }

    public static String getStatusNameByStatus(Integer status){
        RegiFailEnum[] values = RegiFailEnum.values();
        for (RegiFailEnum value : values){
            if (status.intValue() == value.getStatus().intValue()){
                return value.getMsg();
            }
        }
        return "";
    }
}
